export default class LayerData {
    constructor(e, t, n) {
        this.isMark = n;
        this.frames = new Array;
        this.name = e;
        this.flashName = t;
        this.clipDatas = new Array;
    }
}


LayerData.prototype.addFrame = function (e) {
    this.frames.push(e);
};
LayerData.prototype.addClipData = function (name,anchor) {
    var data = {name:name.split(".")[0], anchor:anchor}
    this.clipDatas.push(data);
};
LayerData.prototype.getClipData = function (e) {
    return this.name == "none" ? null : e < this.clipDatas.length ? this.clipDatas[e] : this.clipDatas[this.clipDatas.length - 1];
};
LayerData.prototype.clone = function () {
    var t = new LayerData(this.name, this.flashName, false);
    for (var n = 0; n < this.clipDatas.length; n++){
        var name = this.clipDatas[n].name;
        t.addClipData(name,this.clipDatas[n].anchor);
    }
    for (n = 0; n < this.frames.length; n++)
        t.addFrame(frames[n].clone());
    return t;
};
